#pragma once
#include "DirWatcher.h"
#include <map>
namespace Poco {
	class File;
}
class SrcFilesWatcher
{
public:
	SrcFilesWatcher();
	~SrcFilesWatcher();
	void watch();
protected:
	void onItemAdded(const DirWatcher::DirectoryEvent& ev);
	void onItemRemoved(const DirWatcher::DirectoryEvent& ev);
	void onItemModified(const DirWatcher::DirectoryEvent& ev);

	
	//void onItemMovedFrom(const Poco::DirectoryWatcher::DirectoryEvent& ev);//linux event
	//void onItemMovedTo(const Poco::DirectoryWatcher::DirectoryEvent& ev);//linux event
private:

	void watchDir(const Poco::File & f);
	void unwatchDir(const Poco::File & f);
	std::map<std::string, DirWatcher*> watchers;

};

